<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">
    <title>${title!"智讯前沿"}</title>
    <!-- 引入样式文件 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.12.20/lib/index.css">
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
            background-color: #f8f9fa;
            margin: 0;
            padding: 0;
        }

        .article-container {
            max-width: 750px;
            margin: 0 auto;
            background-color: #fff;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            min-height: 100vh;
        }

        .article-header-section {
            padding: 20px 16px 16px;
            border-bottom: 1px solid #eee;
        }

        .article-title {
            font-size: 24px;
            font-weight: bold;
            color: #323233;
            line-height: 1.4;
            margin-bottom: 16px;
        }

        .article-meta {
            display: flex;
            align-items: center;
        }

        .author-info {
            flex: 1;
            margin-left: 12px;
        }

        .author-name {
            font-size: 16px;
            font-weight: 500;
            color: #323233;
            margin-bottom: 4px;
        }

        .publish-time {
            font-size: 12px;
            color: #969799;
        }

        .avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
        }

        .article-content {
            padding: 20px 16px;
        }

        .article-text {
            font-size: 16px;
            line-height: 1.7;
            color: #323233;
            margin-bottom: 16px;
            white-space: pre-wrap;
            word-wrap: break-word;
        }

        .article-image {
            margin: 16px 0;
            text-align: center;
        }

        .article-image img {
            max-width: 100%;
            border-radius: 8px;
            vertical-align: middle;
        }
    </style>
</head>
<body>
<div id="app">
    <div class="article-container">
        <!-- 文章头部 -->
        <div class="article-header-section">
            <h1 class="article-title">${title!""}</h1>

            <div class="article-meta">
                <img src="${authorImage!'https://p3.pstatp.com/thumb/1480/7186611868'}"
                     alt="Author Avatar"
                     class="avatar">

                <div class="author-info">
                    <div class="author-name">${authorName!"匿名用户"}</div>
                    <div class="publish-time">
                        <#if publishTime??>
                            ${publishTime?string("yyyy-MM-dd HH:mm")}
                        <#else>
                            未知时间
                        </#if>
                    </div>
                </div>
            </div>
        </div>

        <!-- 文章内容 -->
        <div class="article-content">
            <#if content??>
                <#list content as item>
                    <#if item.type == 'text'>
                        <div class="article-text">${item.value!""}</div>
                    <#elseif item.type == 'image'>
                        <div class="article-image">
                            <img src="${item.value}"
                                 width="100%"
                                 loading="lazy"
                                 onerror="this.parentElement.style.display='none'">
                        </div>
                    </#if>
                </#list>
            </#if>
        </div>
    </div>
</div>

<!-- 引入 Vue 和 Vant 的 JS 文件 -->
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vant@2.12.20/lib/vant.min.js"></script>
</body>
</html>